home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1987 May
/
Ahoy_Magazine_87-05_1987_Double_L_Side_A.d64
/
Outcast Order 3
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
328b
|
10 lines
0 rem << cd41-6 >>
1 rem ==================================
2 rem commodares problem #37-2 :
3 print"[147]outcast order"
4 rem solution by
5 rem mike strawn
6 rem ==================================
10 input"n,m";n,m :dim a(n) :for i=0 to n-1: a(i)=i+1 : next : a(n)=1
20 for i=1 to m: pp=p: p=a(p): next: print p;: a(pp)=a(p): if p<>pp then 20